POV-Ray : Newsgroups : povray.text.scene-files : Missing glows in 3.5? An alternative solution : Missing glows in 3.5? An alternative solution Server Time
5 Jul 2024 10:10:04 EDT (-0400)
  Missing glows in 3.5? An alternative solution  
From: Warp
Date: 14 Sep 2001 08:40:41
Message: <3ba1fac9@news.povray.org>
One of the features not included in 3.5 were glows. Of course it's a pitty
because they are so useful, but the code was so incomplete and it was such
a late addition that it wasn't included.
  If you miss glows but want to use 3.5 anyways, you can replace them with
media.
  Of course using media is a lot slower (because media sampling is slower and
because the containers increase the need of a high max_trace_level), so
forget adding tens of thousands of glows to your scene, but at least you
can get something.
  Here is an example of how to achieve this:

----------8<------------8<-------------8<-------------8<-------------8<-----
#macro Glow(GlowColor, Scale)
  sphere
  { 0, 1 hollow no_shadow
    pigment { rgbt 1 }
    interior
    { media
      { emission 1/Scale
        density
        { spherical density_map
          { [0 rgb 0][.5 rgb GlowColor*.5][1 rgb 1]
          }
        }
        samples 1,1 intervals 1 confidence .1 // quite fast settings
        method 3
      }
    }
    scale Scale
  }
#end

camera { location -z*10 look_at 0 angle 35 }
plane { y,-2 pigment { checker rgb 1, rgb .5 } }

light_source
{ <-1.5,1,0>, <1,.5,0>
  looks_like { Glow(<1,.5,0>, .5) }
}
light_source
{ <2,.5,0>, <0,.5,1>
  looks_like { Glow(<0,.5,1>, 1) }
}
----------8<------------8<-------------8<-------------8<-------------8<-----

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.